<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">

<html>

<head>

<link rel="Stylesheet" type="text/css" href="css/Stylesheet.css">

</head>

<body>

<h1></h1>
 
<ul id="menu" align=center>
  <li><form id=NoBox action="LoginServlet" method="get"><input id="NoBox" type="submit" name="Login" value="Login" /></form></li>
  <li><form id=NoBox action="VisitorRegistrationServlet" method="get"><input id="NoBox" type="submit" name="New Visitor" value="New Visitor" /></form></li>
</ul>

<form action="LoginServlet" method="post">

<h2>Festival Registration System</h2>
<h3> Portal Login Page </h3>
<table align=center>
<tr>
	<td><label for="username">User Name: </label></td>
	<td><input type="text" name="username" id="username" placeholder="Enter your user name" required="required" autofocus="autofocus" minlength="6" maxlength="12"></td>
</tr>

<tr>
	<td><label for="password">Password: </label></td>
	<td><input name="password" required="required" type="password" id="password" placeholder="Enter your password" required="required" autofocus="autofocus" minlength="6" maxlength="15"></td>
</tr>

<tr>
<td></td>
<td><input type="submit" name="Login" value="Login" /></td>
</tr>

<tr>
<td></td><td></td>
</tr>

</table>
</form>

<% String error = (String) session.getAttribute("error"); %>

<%if(error!=null){ %>
<script> 
alert ("<%=error%>");
</script>

<%session.setAttribute("error",null);} %>

</body>
</html>
